﻿@model PageList<Student>
@{
    string trainGroupId = ViewBag.trainGroupId;
    bool? isView = ViewBag.isView;
}
<table class="table table-striped table-bordered table-hover table-fix table-manage">
    <thead>
    <tr>
        @if (!isView.HasValue)
        {
            <th class="w35px">
                <label><input class="checkbox-check" type="checkbox"><span></span></label>
            </th>
        }
        <th class="text-center w80px" data-order="@nameof(Student.Name)">姓名</th>
        <th class="text-center w200px" data-order="@nameof(Student.IDCardNo)">身份证号</th>
        <th class="text-center w130px" data-order="@nameof(Student.MobilePhone)">手机号码</th>
        <th class="text-center w80px" data-order="@nameof(Student.DrivingModel)">准驾车型</th>
        <th class="text-center " data-order="@nameof(Student.CompanyName)">服务公司</th>
        <th class="text-center w120px" data-order="@nameof(Student.ReservationDateTime)">预约日期</th>
        @if (!isView.HasValue)
        {
            <th class="text-center w50px">操作</th>
        }
    </tr>
    </thead>
    <tbody>
        @foreach (var record in Model)
        {
            <tr>
                @if (!isView.HasValue)
                {
                    <td>
                        <label><input class="checkbox-check" type="checkbox" value="@record.Id"><span></span></label>
                    </td>
                }
                <td class="text-center">@record.Name</td>
                <td class="text-center">@record.IDCardNo</td>
                <td class="text-center">@record.MobilePhone</td>
                <td class="text-center">@record.DrivingModel</td>
                <td class="text-center nowrap">@record.CompanyName</td>
                <td class="text-center">@DateTimeHelper.FormatDate(record.ReservationDateTime)</td>
                @if (!isView.HasValue)
                {
                    <td class="text-center">
                        @if (record.Status == 2)
                        {
                            <a class="un-reservation-table-student"
                               data-url="@Url.Action("UnReservation", new {trainGroupId = trainGroupId, studentIds = record.Id})">取消</a>
                        }
                    </td>
                }
            </tr>
        }
    </tbody>
</table>
@Html.RenderPages(Model)
